<?php
/*
 * @Author: 李志刚
 * @CopyRight: 2020-2030 衡水山木枝技术服务有限公司
 * @Date: 2021-10-19 10:38:23
 * @Description: 满赠商品
 * @LastEditors: 李志刚
 * @LastEditTime: 2021-10-19 18:27:52
 * @FilePath: /归档/expand/2021_10_19_103823_create_fillgift.php
 */

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateFillgift extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('fillgifts', function (Blueprint $table) {
            $table->engine = 'InnoDB';
            $table->id();
            $table->foreignId('good_id')->default(0)->comment('商品id');
            $table->string('good_title', 100)->comment('商品名称');
            $table->string('title', 100)->comment('团购名称');
            $table->unsignedInteger('store')->default(0)->comment('库存');
            $table->unsignedDecimal('amount')->default(0)->comment('满多少可以赠');
            $table->dateTime('lasttime')->default('2021-10-10 00:00:00')->comment('上架时间');
            $table->dateTime('lowertime')->default('2021-10-10 00:00:00')->comment('下架时间');
            $table->integer('sort')->default(0)->comment('排序 升序');
            $table->boolean('status')->default(1)->comment('1 在售，0 下架');
            $table->tinyInteger('del_flag')->default(0)->comment('删除状态（1删除 0正常）');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('fillgifts');
    }
}
